package servlet2;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ResponseRedirectServlet2 extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.getWriter().write("response2's result!!!");

        //不共享ResponseRedirectServlet1 中的变量值，获取不到
        System.out.println("key = " + request.getAttribute("key"));//key = null
    }
}
